cmake_minimum_required(VERSION 3.6)
project(GeeJoan)
option(BUILD_TESTING "build test " FALSE)
set(CMAKE_CXX_STANDARD 14)
add_subdirectory(libs/boost_strip)
add_subdirectory(libs/glog)
add_subdirectory(Tool)
add_subdirectory(SubClient)
add_subdirectory(MainServer)
#add_subdirectory(tests)

add_subdirectory(example/echo)
add_subdirectory(example/TestbaseMod)

if("${CMAKE_INSTALL_PREFIX}" MATCHES "")
    MESSAGE(STATUS "CMAKE_INSTALL_PREFIX is empty use will ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}.out ")
    set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}.out" CACHE PATH "Installation directory" FORCE)
endif()

INSTALL(FILES
        ${CMAKE_CURRENT_SOURCE_DIR}/include/base_types.h
        ${CMAKE_CURRENT_SOURCE_DIR}/include/BaseComponent.h
        ${CMAKE_CURRENT_SOURCE_DIR}/include/BaseMod.h
        ${CMAKE_CURRENT_SOURCE_DIR}/include/key_vlaue_mod_type.h
        ${CMAKE_CURRENT_SOURCE_DIR}/include/NetworkProtocol.h
        DESTINATION
        ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}.out/include)
